﻿#pragma once

#include "Containers/String.h"
#include "Containers/SharedObjectPtr.h"
#include "Containers/Delegate.h"

class RTexture2D;

//a line model in the context menu
struct SEditorContextMenuLine
{
    TSharedObjectPtr<RTexture2D> Icon; //icon before the text
    CString Text; 
    CString ShorcutText; //shortcut text
    TVector<SEditorContextMenuLine> SubMenus; //sub menus
    float SubMenuWidth=200; //sub menu width

    //是不是分隔线？
    //如果是，只画一条线
    bool bIsSeparator=false; 

    //是否有效
    //如果无效，不响应点击事件,并且显示灰色
    //如果是分隔线，这个值无任何效果
    bool bIsValid=true;

    //点击事件
    TDelegate<void> OnClicked; 
};